home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 140
/
(Vol 140) Sep 19 2011.iso
/
Games
/
red_cross_eru.swf
/
scripts
/
__Packages
/
gamebase
/
utils
/
DrawUtils.as
< prev
next >
Wrap
Text File
|
2011-09-19
|
12KB
|
333 lines
§§push(true);
§§push(false);
§§push(false);
§§push(true);
while(true)
{
if(§§pop())
{
}
if(§§pop())
{
}
if(§§pop())
{
break;
}
§§push(true);
§§push(false);
}
if(!e.f)
{
e.f = new g();
}
§§pop();
if(!e.f.h)
{
e.f.h = new g();
}
§§pop();
if(!e.f.h[§§constant(4)])
{
var _loc2_ = f.h[§§constant(4)] = function()
{
}[§§constant(5)];
f.h[§§constant(4)] = function()
{
}[§§constant(6)] = function()
{
return eval(§§constant(7))[§§constant(9)](eval(§§constant(7))[§§constant(8)]() * 16777215);
};
f.h[§§constant(4)] = function()
{
}[§§constant(10)] = function(mc, x, y, w, h, c)
{
mc[§§constant(11)](x,y);
mc[§§constant(12)](c);
mc[§§constant(13)](x + w,y);
mc[§§constant(13)](x + w,y + h);
mc[§§constant(13)](x,y + h);
mc[§§constant(13)](x,y);
mc[§§constant(14)]();
};
f.h[§§constant(4)] = function()
{
}[§§constant(15)] = function(mc, x, y, w, h)
{
mc[§§constant(11)](x,y);
mc[§§constant(13)](x + w,y);
mc[§§constant(13)](x + w,y + h);
mc[§§constant(13)](x,y + h);
mc[§§constant(13)](x,y);
};
f.h[§§constant(4)] = function()
{
}[§§constant(16)] = function(mc, x, y, w, h, fill_col, fill_alpha, line_width, line_col, line_alpha)
{
mc[§§constant(17)](line_width,line_col,line_alpha);
mc[§§constant(11)](x,y);
mc[§§constant(12)](fill_col,fill_alpha);
mc[§§constant(13)](x + w,y);
mc[§§constant(13)](x + w,y + h);
mc[§§constant(13)](x,y + h);
mc[§§constant(13)](x,y);
mc[§§constant(14)]();
};
f.h[§§constant(4)] = function()
{
}[§§constant(18)] = function(mc, x, y, r, style)
{
if(!mc[§§constant(19)])
{
mc[§§constant(19)] = mc[§§constant(21)](§§constant(19),mc[§§constant(20)]());
}
mc[§§constant(19)][§§constant(11)](x + r,y);
mc[§§constant(19)][§§constant(17)](1,16777215);
var _loc7_ = eval(§§constant(7))[§§constant(22)](style * 3.141592653589793 / 180);
var _loc1_ = 45;
while(_loc1_ <= 360)
{
var _loc4_ = r * eval(§§constant(7))[§§constant(23)](_loc1_ * 3.141592653589793 / 180);
var _loc3_ = r * eval(§§constant(7))[§§constant(24)](_loc1_ * 3.141592653589793 / 180);
var _loc6_ = _loc4_ + r * _loc7_ * eval(§§constant(7))[§§constant(23)]((_loc1_ - 90) * 3.141592653589793 / 180);
var _loc5_ = _loc3_ + r * _loc7_ * eval(§§constant(7))[§§constant(24)]((_loc1_ - 90) * 3.141592653589793 / 180);
mc[§§constant(19)][§§constant(25)](_loc6_ + x,_loc5_ + y,_loc4_ + x,_loc3_ + y);
_loc1_ += 45;
}
};
f.h[§§constant(4)] = function()
{
}[§§constant(26)] = function(mc, x, y, r, angstep, clr, alph, line_alpha, line_clr)
{
if(alph == undefined)
{
alph = 100;
}
if(line_alpha == undefined)
{
line_alpha = alph;
}
if(line_clr == undefined)
{
line_clr = clr;
}
var _loc11_ = x + 0 * r;
var _loc10_ = y - 1 * r;
mc[§§constant(11)](_loc11_,_loc10_);
mc[§§constant(17)](0,line_clr,line_alpha);
mc[§§constant(12)](clr,alph);
var _loc1_ = angstep;
while(_loc1_ <= 360)
{
var _loc3_ = x + eval(§§constant(7))[§§constant(24)](_loc1_ * 3.141592653589793 / 180) * r;
var _loc2_ = y - eval(§§constant(7))[§§constant(23)](_loc1_ * 3.141592653589793 / 180) * r;
mc[§§constant(13)](_loc3_,_loc2_);
_loc1_ += angstep;
}
mc[§§constant(14)]();
};
f.h[§§constant(4)] = function()
{
}[§§constant(27)] = function(mc, cx, cy, w, h, clr, alph, line_clr, line_alpha)
{
mc[§§constant(17)](1,line_clr,line_alpha);
mc[§§constant(11)](cx,cy);
mc[§§constant(12)](clr,alph);
var _loc1_ = 0;
while(_loc1_ <= 360)
{
var _loc3_ = eval(§§constant(7))[§§constant(24)](0.017453292519943295 * (- _loc1_)) * w + cx;
var _loc2_ = eval(§§constant(7))[§§constant(23)](0.017453292519943295 * (- _loc1_)) * h + cy;
mc[§§constant(13)](_loc3_,_loc2_);
_loc1_ += 4;
}
mc[§§constant(14)]();
};
f.h[§§constant(4)] = function()
{
}[§§constant(28)] = function(mc, x, y, r, ang, angstep, clr, alph)
{
if(alph == undefined)
{
alph = 100;
}
mc[§§constant(17)](0,clr,alph);
mc[§§constant(11)](x,y);
mc[§§constant(12)](clr,alph);
var _loc1_ = 0;
while(_loc1_ <= ang)
{
var _loc3_ = x + eval(§§constant(7))[§§constant(24)](_loc1_ * 3.141592653589793 / 180) * r;
var _loc2_ = y - eval(§§constant(7))[§§constant(23)](_loc1_ * 3.141592653589793 / 180) * r;
mc[§§constant(13)](_loc3_,_loc2_);
_loc1_ += angstep;
}
mc[§§constant(13)](x,y);
mc[§§constant(14)]();
};
f.h[§§constant(4)] = function()
{
}[§§constant(29)] = function(bmp, x, y, w, h, c)
{
var _loc2_ = x - w / 2;
while(_loc2_ <= x + w / 2)
{
var _loc1_ = y - h / 2;
while(_loc1_ <= y + h / 2)
{
bmp[§§constant(30)](_loc2_,_loc1_,c);
_loc1_ = _loc1_ + 1;
}
_loc2_ = _loc2_ + 1;
}
};
f.h[§§constant(4)] = function()
{
}[§§constant(31)] = function(bmp, x, y, w, h, c)
{
var _loc1_ = new eval(§§constant(32))[§§constant(33)][§§constant(34)](w,h,false,c);
bmp[§§constant(38)](_loc1_,new eval(§§constant(32))[§§constant(35)][§§constant(37)](0,0,w,h),new eval(§§constant(32))[§§constant(35)][§§constant(36)](x,y));
_loc1_[§§constant(39)]();
false;
};
f.h[§§constant(4)] = function()
{
}[§§constant(40)] = function(bmp, x, y, r, clr, alph, line_alpha, line_clr)
{
if(alph == undefined)
{
alph = 100;
}
if(line_alpha == undefined)
{
line_alpha = alph;
}
if(line_clr == undefined)
{
line_clr = clr;
}
var _loc4_ = _root[§§constant(21)](f.h[§§constant(41)][§§constant(42)](),_root[§§constant(20)]());
f.h[§§constant(4)][§§constant(26)](_loc4_,r,r,r,5,clr,alph,line_alpha,line_clr);
var _loc3_ = new eval(§§constant(32))[§§constant(33)][§§constant(34)](r * 2,r * 2,true,0);
_loc3_[§§constant(43)](_loc4_);
bmp[§§constant(38)](_loc3_,new eval(§§constant(32))[§§constant(35)][§§constant(37)](0,0,r * 2,r * 2),new eval(§§constant(32))[§§constant(35)][§§constant(36)](x - r,y - r));
_loc3_[§§constant(39)]();
false;
_loc4_[§§constant(44)]();
};
f.h[§§constant(4)] = function()
{
}[§§constant(45)] = function(bmp, text, x, y, w, h, c)
{
var _loc2_ = _root[§§constant(47)](§§constant(46),_root[§§constant(20)](),0,0,w,h);
_loc2_[§§constant(48)] = §§constant(49);
_loc2_[§§constant(50)] = text;
var _loc3_ = new eval(§§constant(32))[§§constant(33)][§§constant(34)](w,h,false,c);
_loc3_[§§constant(43)](_loc2_);
bmp[§§constant(38)](_loc3_,new eval(§§constant(32))[§§constant(35)][§§constant(37)](0,0,w,h),new eval(§§constant(32))[§§constant(35)][§§constant(36)](x,y));
_loc3_[§§constant(39)]();
false;
_loc2_[§§constant(51)]();
};
f.h[§§constant(4)] = function()
{
}[§§constant(52)] = function(mc, x, y, startAngle, arc, radius, colr)
{
var _loc18_ = undefined;
var _loc1_ = undefined;
var _loc3_ = undefined;
var _loc4_ = undefined;
var _loc13_ = undefined;
var _loc7_ = undefined;
var _loc6_ = undefined;
var _loc12_ = undefined;
var _loc10_ = undefined;
var _loc11_ = undefined;
var _loc9_ = undefined;
mc[§§constant(17)](1,colr,100);
mc[§§constant(12)](colr);
mc[§§constant(11)](x,y);
if(eval(§§constant(7))[§§constant(53)](arc) > 360)
{
arc = 360;
}
_loc13_ = eval(§§constant(7))[§§constant(54)](eval(§§constant(7))[§§constant(53)](arc) / 45);
_loc18_ = arc / _loc13_;
_loc1_ = (- _loc18_ / 180) * 3.141592653589793;
_loc3_ = (- startAngle / 180) * 3.141592653589793;
if(_loc13_ > 0)
{
_loc7_ = x + eval(§§constant(7))[§§constant(23)](startAngle / 180 * 3.141592653589793) * radius;
_loc6_ = y + eval(§§constant(7))[§§constant(24)]((- startAngle) / 180 * 3.141592653589793) * radius;
mc[§§constant(13)](_loc7_,_loc6_);
_loc7_ = x;
_loc6_ = y;
var _loc5_ = undefined;
_loc5_ = 0;
while(_loc5_ < _loc13_)
{
_loc3_ += _loc1_;
_loc4_ = _loc3_ - _loc1_ / 2;
_loc12_ = _loc7_ + eval(§§constant(7))[§§constant(23)](_loc3_) * radius;
_loc10_ = _loc6_ + eval(§§constant(7))[§§constant(24)](_loc3_) * radius;
_loc11_ = _loc7_ + eval(§§constant(7))[§§constant(23)](_loc4_) * (radius / eval(§§constant(7))[§§constant(23)](_loc1_ / 2));
_loc9_ = _loc6_ + eval(§§constant(7))[§§constant(24)](_loc4_) * (radius / eval(§§constant(7))[§§constant(23)](_loc1_ / 2));
mc[§§constant(25)](_loc11_,_loc9_,_loc12_,_loc10_);
_loc5_ = _loc5_ + 1;
}
mc[§§constant(13)](x,y);
mc[§§constant(13)](_loc7_,_loc6_);
mc[§§constant(14)]();
}
};
f.h[§§constant(4)] = function()
{
}[§§constant(55)] = function(mc, left, right, top, bottom, edgeWidth, clr, alpha)
{
mc[§§constant(17)](0,clr,0);
mc[§§constant(11)](left,top);
mc[§§constant(12)](clr,alpha);
mc[§§constant(13)](right,top);
mc[§§constant(13)](right,top + edgeWidth);
mc[§§constant(13)](left,top + edgeWidth);
mc[§§constant(13)](left,top);
mc[§§constant(14)]();
mc[§§constant(11)](left,bottom);
mc[§§constant(12)](clr,alpha);
mc[§§constant(13)](right,bottom);
mc[§§constant(13)](right,bottom - edgeWidth);
mc[§§constant(13)](left,bottom - edgeWidth);
mc[§§constant(13)](left,bottom);
mc[§§constant(14)]();
mc[§§constant(11)](left,top + edgeWidth);
mc[§§constant(12)](clr,alpha);
mc[§§constant(13)](left,bottom - edgeWidth);
mc[§§constant(13)](left + edgeWidth,bottom - edgeWidth);
mc[§§constant(13)](left + edgeWidth,top + edgeWidth);
mc[§§constant(13)](left,top + edgeWidth);
mc[§§constant(14)]();
mc[§§constant(11)](right,top + edgeWidth);
mc[§§constant(12)](clr,alpha);
mc[§§constant(13)](right,bottom - edgeWidth);
mc[§§constant(13)](right - edgeWidth,bottom - edgeWidth);
mc[§§constant(13)](right - edgeWidth,top + edgeWidth);
mc[§§constant(13)](right,top + edgeWidth);
mc[§§constant(14)]();
};
f.h[§§constant(4)] = function()
{
}[§§constant(56)] = function(mc, rotRect, fill_col, fill_alpha)
{
mc[§§constant(17)](0,fill_col,0);
mc[§§constant(11)](rotRect[§§constant(57)][§§constant(59)],rotRect[§§constant(57)][§§constant(58)]);
mc[§§constant(12)](fill_col,fill_alpha);
mc[§§constant(13)](rotRect[§§constant(60)][§§constant(59)],rotRect[§§constant(60)][§§constant(58)]);
mc[§§constant(13)](rotRect[§§constant(61)][§§constant(59)],rotRect[§§constant(61)][§§constant(58)]);
mc[§§constant(13)](rotRect[§§constant(62)][§§constant(59)],rotRect[§§constant(62)][§§constant(58)]);
mc[§§constant(13)](rotRect[§§constant(57)][§§constant(59)],rotRect[§§constant(57)][§§constant(58)]);
mc[§§constant(14)]();
};
§§push(§§constant(63)(f.h[§§constant(4)][§§constant(5)],null,1));
}
§§pop();